﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LGE;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Thaneros
{
    public class GameObject : EngineObject
    {
        public Vector2 drawPosition = Vector2.Zero;
        public PlayScreen ps;

        public GameObject(PlayScreen ps, Texture2D sprite)
            : base(sprite)
        {
            this.ps = ps;
        }

        public override void Update(GameTime gameTime)
        {
        }

        public override void Draw(SpriteBatch spriteBatch)
        {
            if (ps.c == null || sprite == null) return;

            drawPosition = position - ps.c.position + ps.c.drawPosition;
            spriteBatch.Draw(sprite, drawPosition, sourceRectangle, Color.White, rotation, origin, scale, SpriteEffects.None, 0);
        }
    }
}
